define(function (require, exports, module) {

    function onload() {
        return function mouseEventPoint(mouseEvent, container) {
            const rect = container.getBoundingClientRect();
            return new mapboxgl.Point(
                mouseEvent.clientX - rect.left - (container.clientLeft || 0),
                mouseEvent.clientY - rect.top - (container.clientTop || 0)
            );
        }
    }

    module.exports = {
        onload
    }
});
